package com.lxp.ssh2.web.action.organize.companies;

import java.util.List;

import org.apache.struts2.convention.annotation.Action;
import org.apache.struts2.convention.annotation.ParentPackage;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;

import com.lxp.ssh2.po.Company;
import com.lxp.ssh2.service.CompanyService;
import com.lxp.ssh2.vo.Page;
import com.lxp.ssh2.web.action.BaseAction;

@Controller
@ParentPackage(value="ssh2-default")
public class CompanyAction extends BaseAction {
	
	@Autowired
	private CompanyService companyService;
	
	
	private Page<Company> page;
	
	public Page<Company> getPage() {
		return page;
	}

	@Action(value="list")
	public String queryList() {
		page = companyService.findPage(super.getPageRequest());
		return SUCCESS;
	}
}
